<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <div id="name">
        LastName:<input type="text" v-model="lastname" placeholder="Please enter your LastName"> FirstName:
        <input type="text" v-model="firstname" placeholder="Please enter your FirstName">
        <span>{{name}}</span>
    </div>
    <script src="../libs/vue/Vue.min.js"></script>
    <script>
        new Vue({
            el: "#name",
            data: {
                firstname: '',
                lastname: '',
                name: "",
            },
            watch: {
                firstname() {
                    this.name = this.lastname + this.firstname
                },
                lastname() {
                    this.name = this.lastname + this.firstname
                }
            },
        })
    </script>
</body>

</html>